package com.abner.material.design.activities;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import activities.design.material.abner.com.materialdesigndemo.R;
import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @InjectView(R.id.tv_parentLayout)
    TextView tv_parentLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.inject(this);
        init();
        initView();
    }

    private void initView() {
    }

    private void init() {
        System.out.println("init方法");
        System.out.println("init方法");
    }

    @OnClick(R.id.tv_parentLayout)
    public void onClick(View view){
        switch (view.getId()){
            case R.id.tv_parentLayout:
                intent2RelativeActivity(ParentLayoutActivity.class);
                break;
        }
    }

    private void intent2RelativeActivity(Class clazz) {
        Intent intent = new Intent(this,clazz);
        startActivity(intent);
    }

}
